package com.gwtt.simulator.netconf.subsystem;

import org.apache.sshd.server.channel.ChannelSession;
import org.apache.sshd.server.command.Command;
import org.apache.sshd.server.subsystem.SubsystemFactory;

import java.io.IOException;

public class NetconfSubsystemFactory implements SubsystemFactory {

    @Override
    public String getName() {
        return "netconf";
    }

    @Override
    public Command createSubsystem(ChannelSession channel) throws IOException {
        return new NetconfAsyncCommand(channel.getSession().getClientAddress().toString());
    }

}
